﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.WindowsAzure.StorageClient;

namespace AzureGames.Data.Implementation.ServiceEntities
{
    public class BoardEntity : BaseTableEntity
    {
        public const int Created = 0;
        public const int Active = 1;
        public const int Completed = 2;
        public const int Cancelled = 3;
        public Guid ID { get; set; }
        public int GameDefinitionID { get; set; }
        public Int64 Value { get; set; }
        public List<string> PlayerIDs { get; set; }
        public int State { get; set; }
        public List<string> Properties { get; set; }


        public static implicit operator Model.Board(BoardEntity from)
        {
            return AutoMapper.Mapper.Map<BoardEntity, Model.Board>(from);
        }

        public static implicit operator BoardEntity(Model.Board from)
        {
            return AutoMapper.Mapper.Map<Model.Board, BoardEntity>(from);
        }
    }
}
